<template>
    <div :key="dealWithKey">
        <!--003004 GMRXRTTHUXOQENUDHY-->
        <!--003001 UMVQCXWQVBUHKSMZBT-->
        <dealWith003005 v-if="parameterData.sqsxbm == '003005'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith003003 v-else-if="parameterData.sqsxbm == '003003'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith003009 v-else-if="parameterData.sqsxbm == '003009'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith003007 v-else-if="parameterData.sqsxbm == '003007'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith003001 v-else-if="parameterData.sqsxbm == '003001'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith003004 v-else-if="parameterData.sqsxbm == '003004'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/> 
        <dealWith v-else ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
    </div>
</template>
<script>
import dealWith from './dealWith.vue'
import dealWith003005 from './dealWith-003005.vue'
import dealWith003003 from './dealWith-003003.vue'
import dealWith003009 from './dealWith-003009.vue'
import dealWith003007 from './dealWith-003007.vue'
import dealWith003001 from './dealWith-003001.vue'
import dealWith003004 from './dealWith-003004.vue'
import {getSqsxBm} from './service/index.js'
export default {
    components:{
        dealWith,
        dealWith003005,
        dealWith003003,
        dealWith003009,
        dealWith003007,
        dealWith003001,
        dealWith003004,
    },
    props:{

    },
    data(){
        return{
            parameterData:{},
            dealWithKey:null,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getDatas(val){
            this.$store.dispatch('UpdateSpinningPrice', {key:true,stateKey:'modalSpinningPrice'})
            getSqsxBm({sqsxid:val.sqsxid}).then(res=>{
                if(res.code == 200){
                    val['sqsxbm'] = res.result
                    //console.log('获取到什么啊！',val)
                    this.parameterData = val
                    this.dealWithKey = Date.now()
                    this.$nextTick(()=>{
                        this.$store.dispatch('UpdateSpinningPrice', {key:true,stateKey:'modalSpinningPrice'})
                        this.$refs.dealWithRef.getDatas(val)
                    })
                }else{
                    this.$message.warning(res.message)
                }
            })
            
        },
        updatedSuccess(){
            this.$emit('updatedSuccess')
        },
        successReturn(val){
            this.$emit('successReturn',val)
        }
    }
}
</script>